Repository navigation
Conversation
popcornmix
force-pushed
the
rpi-7.3.y
branch
2 times, most recently
from
October 5, 2026 16:12
6aaa924 to
bec43c4
Compare
Instead of having 48 generic overlay planes, assign 32 to the writeback connector so that there is no ambiguity in wlroots when trying to find a plane for composition using the writeback connector vs display. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The transposer/writeback connector should be running with a lower priority, so shouldn't be factored into the load calculations. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
As the writeback connector doesn't have the same realtime constraints of a live display, drop the panic priority for it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The txp block can implement transpose as it writes out the image data, so expose that through the new connector rotation property. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm: vc4: txp: Do not allow 24bpp formats when transposing The hardware doesn't support transposing to 24bpp (RGB888/BGR888) formats. There's no way to advertise this through DRM, so block it from atomic_check instead. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: txp: fix incorrect width and height check logic in vc4_txp_atomic_check Since incorrect conditional operator was used in vc4_txp_atomic_check(), the check may be bypassed if only one of the width or height does not match. To prevent this, the conditional operator must be corrected. Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Currently, booting with no hdmi connected has: pi@pi4:~ $ vcgencmd measure_clock hdmi pixel frequency(9)=120010256 frequency(29)=74988280 After connecting hdmi we get: pi@pi4:~ $ vcgencmd measure_clock hdmi pixel frequency(9)=300005856 frequency(29)=149989744 and that persists after disconnecting hdmi I can measure this on a power supply as 10mA@5.2V (52mW). We should always remove clk_set_min_rate requests when we no longer need them. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Whilst BCM2712 does fix using odd horizontal timings, it doesn't work with interlaced modes. Drop the workaround for interlaced modes and revert to the same behaviour as BCM2711. raspberrypi#6281 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This is a squash of all firmware-kms related patches from previous branches, up to and including "drm/vc4: Set the possible crtcs mask correctly for planes with FKMS" plus a couple of minor fixups for the 5.9 branch. Please refer to earlier branches for full history. This patch includes work by Eric Anholt, James Hughes, Phil Elwell, Dave Stevenson, Dom Cobley, and Jonathon Bell. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: Fixup firmware-kms after "drm/atomic: Pass the full state to CRTC atomic enable/disable" Prototype for those calls changed, so amend fkms (which isn't upstream) to match. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: Fixup fkms for API change Atomic flush and check changed API, so fix up the downstream-only FKMS driver. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: Make normalize_zpos conditional on using fkms Eric's view was that there was no point in having zpos support on vc4 as all the planes had the same functionality. Can be later squashed into (and fixes): drm/vc4: Add firmware-kms mode Signed-off-by: Dom Cobley <popcornmix@gmail.com> drm/vc4: FKMS: Change of Broadcast RGB mode needs a mode change The Broadcast RGB (aka HDMI limited/full range) property is only notified to the firmware on mode change, so this needs to be signalled when set. raspberrypi/firmware#1580 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc4/drv: Only notify firmware of display done with kms fkms driver still wants firmware display to be active Signed-off-by: Dom Cobley <popcornmix@gmail.com> ydrm/vc4: fkms: Fix margin calculations for the right/bottom edges The calculations clipped the right/bottom edge of the clipped range based on the left/top margins. raspberrypi#4447 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: fkms: Use new devm_rpi_firmware_get api drm/kms: Add allow_fb_modifiers Signed-off-by: Dom Cobley <popcornmix@gmail.com> drm/vc4: Add async update support for cursor planes Now that cursors are implemented as regular planes, all cursor movements result in atomic updates. As the firmware-kms driver doesn't support asynchronous updates, these are synchronous, which limits the update rate to the screen refresh rate. Xorg seems unaware of this (or at least of the effect of this), because if the mouse is configured with a higher update rate than the screen then continuous mouse movement results in an increasing backlog of mouse events - cue extreme lag. Add minimal support for asynchronous updates - limited to cursor planes - to eliminate the lag. See: raspberrypi#4971 raspberrypi#4988 Signed-off-by: Phil Elwell <phil@raspberrypi.com> drivers/gpu/drm/vc4: Add missing 32-bit RGB formats The missing 32-bit per pixel ABGR and various "RGB with an X value" formats are added. Change sent by Dave Stevenson. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> drm: vc4: Fixup duplicated macro definition in vc4_firmware_kms Both vc4_drv.h and vc4_firmware_kms.c had definitions for to_vc4_crtc. Rename the fkms one to make it unique, and drop the magic define vc4_crtc vc4_kms_crtc define to_vc4_crtc to_vc4_kms_crtc that renamed half the variable and function names in a slightly unexpected way. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: Fix FKMS for when the YUV chroma planes are different buffers The code was assuming that it was a single buffer with offsets, when kmstest uses separate buffers and 0 offsets for each plane. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: fkms: Rename plane related functions The name collide with the Full KMS functions that are going to be made public. Signed-off-by: Maxime Ripard <maxime@cerno.tech> drm/vc4_fkms: Fix up interrupt handler for both 2835/2711 and 2712 2712 has switched from using the SMI peripheral to another interrupt source for the vsync interrupt, so handle both sources cleanly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drm/vc4: fkms: No SMI abuse needed on BCM2712 Since we don't use the (absent) SMI block to create interrupts on BCM2712, there's no need to map any registers. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Testing whether the VideoCore generation we want to mock is vc5 or vc4 worked so far, but will be difficult to extend to support BCM2712 (VC6). Convert to a switch. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The DRM device pointer and the DRM encoder pointer are redundant, since the latter is attached to the former and we can just follow the drm_encoder->dev pointer. Let's remove the drm_device pointer argument. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Some tests will need to retrieve the output that was just allocated by vc4_mock_atomic_add_output(). Instead of making them look them up in the DRM device, we can simply make vc4_mock_atomic_add_output() return an error pointer that holds the allocated output instead of the error code. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The BCM2712 has a simpler pipeline that can only output to a writeback connector and two HDMI controllers. Let's allow our kunit tests to create a mock of that pipeline. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The BCM2712 has a simpler pipeline than the BCM2711, and thus the muxing requirements are different. Create some tests to make sure we get proper muxing decisions. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The current mock planes were just using the regular drm_plane_state, while the driver expect struct vc4_plane_state that subclasses drm_plane_state. Hook the proper implementations of reset, duplicate_state, destroy and atomic_check to create vc4_plane_state. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Some tests will need to find a plane to run a test on for a given CRTC. Let's create a small helper to do that. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
We'll start to add some tests for the plane state logic, so let's create a helper to add a plane to an existing atomic state. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
We'll start testing our planes code in situations where we will use more than XRGB8888, so let's add a few common pixel formats. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The BCM2712 comes with a different LBM size computation than the previous generations, so let's add the few examples provided as kunit tests to make sure we always satisfy those requirements. Signed-off-by: Maxime Ripard <maxime@cerno.tech> drm/vc4: tests: Fix up vc4_test_lbm_size Following the example of [1], move the state allocation out of the init function to make it thread safe. [1] commit 7e0351a ("drm/vc4: tests: Stop allocating the state in test init") Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The tests on vc4 (BCM2835-7) were checking for DSI1 muxing being to restricted channel 2, and therefore muxing with TXP was impossible. As we no longer have that restriction, update the capabilities defined for DSI1, move the tests that used to be impossible to the valid list, and extend for additional combinations that are now possible. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Get the KUnit tests passing. Signed-off-by: Maíra Canal <mcanal@igalia.com>
LBM is only relevant for each active dlist, so there is no need to double-buffer the allocations. Cache the allocations per plane so that we can ensure the allocations are possible. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Add ALSA jack detection to the vc4-hdmi audio driver so userspace knows when to add/remove HDMI audio devices. Signed-off-by: David Turner <david.turner@raspberrypi.com> drm/vc4: hdmi: Remove duplicate hotplug helper call vc4_hdmi_handle_hotplug() calls drm_atomic_helper_connector_hdmi_hotplug() twice: once from the downstream commit 7a761a6 ("vc4: Add jack detection to HDMI audio driver") and once from the upstream code it was rebased onto, which gained the same call in commit 34f051a ("drm/vc4: hdmi: Call HDMI hotplug helper on disconnect"). The helper reads the EDID over DDC, so every detect currently performs two full EDID reads and signals the audio jack state twice. Drop the duplicate and keep the call where upstream has it, after the locking comment. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Slave addresses for DMA are meant to be supplied as physical addresses (contrary to what struct snd_dmaengine_dai_dma_data does). Signed-off-by: Phil Elwell <phil@raspberrypi.com>
It was noted that if PV1 was in use to drive DSI1, then the writeback connector could not be used as HVS channel 2 was already in use. The HVS allows PV1 (HVS output 2) to be driven by any HVS channel via the DSP3_MUX setting, but that was hardcoded to be either 2 (for PV1) or disabled for TXP. Expand the available channels field for PV1, and configure DSP3_MUX accordingly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
If an HDMI connector has no EDID and the mode is set via the kernel command line, then drm_reset_display_info() is the only thing that will have set up any of connector->display_info. With commit 26ff1c3 ("drm/connector: hdmi: Compute bpc and format automatically"), it is now checked that DRM_COLOR_FORMAT_RGB444 is supported. Whilst it doesn't fail the request, it does log dev_warn for every commit, spamming the log. For HDMI connectors initialise the color_format field to say it supports RGB444. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
vc4's debugfs support was updated with drm_debugfs_entry whilst BCM2712 support was in progress, and missed that the lookup in vc6_hvs_debugfs_dlist still followed the old pattern. Correct that lookup to avoid an invalid dereference. Fixes: f7af8ae ("drm/vc4: hvs: Add support for BCM2712 HVS") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
DT allows configuration of multiple link frequencies. V4L2_CID_LINK_FREQ allows read write control. Join these up so that link frequency can be configured at run time, as long, as the sensor isn't streaming. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
As we have a way to confirm which Starvis2 module is connected, add a generic compatible that will use all defined variants to attempt to identify which module is connected. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
IMX662 is a 1080p Starvis 2 sensor that follows the same programming pattern as IMX678, so add it to the newly parameterised common driver. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The IMX675 is a 5MPix Starvis2 sensor that follows the same programming pattern as IMX678 and IMX662, so add it into the driver. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
IMX832 is replacing IMX662, and it follows the same pattern as all the Starvis2 sensors. Add the sensor specific configuration for it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
IMX585 is an 8MPix Starvis 2 sensor, so add support for it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
HCG (High Conversion Gain) adds additional gain within the sensor, but also requires that the minimum analogue gain is 34 rather than 0 when in the default LCG mode. Add a module parameter that is read during probe and at the start of enable_streams, and adjust settings accordingly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Whilst normally digital gain would be applied in the ISP, there are some situations where it is an advantage to allow the use of the on-sensor digital gain too. Allow it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The analog crop reported for these two modes uses the full pixel array size (9248x6944), but the register settings read a smaller area: - 8000x6000 reads x 624-8623, y 472-6471 unbinned (0x0344-0x034a), so the crop is 8000x6000 at the existing offset. - 9152x6944 reads the full array and then keeps the first 9152 columns (0x0408 = 0, 0x040c = 9152), so the crop is 9152x6944 at offset 0. Tested on a Pi 5: each mode's image was located inside a full-array capture, confirming the position and 1:1 scale. Link: raspberrypi#7650 Signed-off-by: Carlos Beltran <cbeltran@managingcomposites.com>
rp1_adc_read() returns with the spinlock held when the ADC is not ready in time or reports a conversion error. The next read then spins on the lock forever with preemption disabled. This also happens when RP1 stops responding on PCIe, since CS then reads as all ones with both READY and ERR set. Fixes: 512bbbd ("hwmon: Add RP1 ADC and temperature driver") Link: raspberrypi#7653 Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
The software reference for imx678 lists register SHR0 setting the shutter sweep time with a valid range of 4 to (Number of lines per frame - 1), and then gives the example of all-pixel scan mode with VMAX=2250 and SHR0=2249 giving an integraion time of "1H + Toffset" (further defining Toffset as 0). The driver defining STARVIS2_EXPOSURE_MIN as 2 would therefore be contradictory, and increasing the minimum exposure achievable. Correct STARVIS2_EXPOSURE_MIN. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Expose the existing DT property on pcf85063/pcf85063a so 12.5 pF crystals can be selected from config.txt. Signed-off-by: Arthur Guilliman <auroraxq@protonmail.com>
Start the description on column 33. Signed-off-by: Arthur Guilliman <auroraxq@protonmail.com>
Disabling a channel will stall and timeout if it is currently transferring to or from a slow peripheral with handshaking (which they all have). When that happens, use the channels "abort" feature to unblock the channel. See: raspberrypi#7642 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
In the event of a signal being received, the transfer functions should return -ERESTARTSYS, having updated the ioctl args in place to prevent any duplication, so that the ioctl will be automatically retried once the signal has been dealt with. Also remove a few unnecessary error messages for non-error conditions. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The DMAC's hardware handshake requires a peripheral's DMA request to stay asserted until the DMAC acknowledges a burst. If an SM's RX FIFO reaches its DMA threshold with no transfer queued - for example when a program exits - the request is held, and survives the FIFO being cleared or drained. The next user of that SM then gets a phantom burst: the first 4 or 8 words it receives are copies of a stale FIFO entry. When an SM is released, and after it has been disabled, retire any held request and leftover data with a throwaway RX transfer of a FIFO's worth plus one burst, then stop the channel. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Enable CONFIG_HX711=m in the Raspberry Pi configurations so kernel packages include the existing IIO driver for HX711 load-cell ADCs. This avoids requiring applications to build and maintain a separate copy of the driver across kernel updates. GPIO assignments still require a device-tree description. Signed-off-by: mason9468 <1879365+mason9468@users.noreply.github.com>
Correcting a fault in the overlay which only became apparent with the update of goodix.c (commit 7363096). The problem was masked before the update by the driver releasing the reset line to input after reset and the PCF8574's high output then let the GT928 run. Signed-off-by: Mark Williams <mark@crystalfontz.com>
Although it hasn't been an issue due to the specifics of the Pi 5 platform, DMA buffers should be allocated and freed with the same "dev" parameter. Guarantee that by deriving the dev pointer from the given dma_info pointer. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1. Set dma->cyclic earlier so it is available to rp1_pio_sm_dma_free in the error path. 2. Set an error code in the case that the cyclic preparation fails. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Build the RTW8852AU driver as a module. See: raspberrypi#7646 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Various PCIe controllers on ARM64 platforms don't support cache snooping, which leads to numerous issues when attempting to use PCIe graphics cards. Switching ttm_prot_from_caching to return pgprot_dmacoherent for ttm_cached pages solves the issue, albeit with a performance hit. There is a second check in ttm_prot_from_caching that also needs updating. Signed-off-by: Yang Bo <bo.yang@smail.nju.edu.cn> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Also includes SND_HDA_* modules for audio on AMD GPUs. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
6by9
force-pushed
the
rpi-7.3.y-pcie-gpu
branch
from
October 12, 2026 13:20
7ef6739 to
05f9b77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR to create CI artifacts supporting AMD and Intel Xe GPUs.
Intel i915 patches appear to no longer be needed to avoid crashing the system. Not tested 3D side as yet.